package org.coding.springbootdemorabbitmq.producer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * ^ enjoy coding and be bugfree boy
 *
 * @author guoxh
 * @date 2020/11/11 11:02 下午
 * @desc
 **/
@Component
public class Sender {
    private static final Logger logger = LoggerFactory.getLogger(Sender.class);
    @Autowired
    private AmqpTemplate amqpTemplate;

    public void send(String msg){
        this.amqpTemplate.convertAndSend("hello-queue",msg);
    }
}
